package com.zt.ztyh.service;

import com.zt.ztyh.entity.ZtyhRecording;
import com.zt.ztyh.vo.UserInfoVo;
import com.zt.ztyh.vo.common.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author Java之父卫相阳
 * @date 2024/4/12 11:30
 * OverSion04
 */
@FeignClient(name = "recording-user", path = "/ztyh/recording")
public interface ZtyhCardOpen {
    /**
     * 添加流水
     * @param moneyOut:交易发起者(用户主键或者卡号)
     * @param moneyIn：交易接收者（用户逐渐或者卡号）
     * @param amount：金额
     * @param operatorType：操作类型
     * @return
     */
    @PostMapping("/addRecording")
    public boolean addRecording(@RequestParam Long moneyOut,@RequestParam  Long moneyIn, @RequestParam BigDecimal amount, @RequestParam Integer operatorType);

    /**
     * 所有记录：通过userId拿到 交易发起者和交易接收者都是这个人的所有数据
     * @param userId:用户主键
     * @return:交易记录的集合
     */
    @GetMapping("/getfindMyjls")
    public Result findMyjls(@RequestParam Long userId,
                            @RequestParam(required = false) String startTime,
                            @RequestParam(required = false) String endTime);
}
